<!DOCTYPE html>
<html>
<head>
	<title>ssss</title>
</head>
<body>
	hellow world
	<button id="button">点击测试ajax get</button>
	<button id="button2">点击测试ajax post</button>
</body>
<script src="https://cdn.staticfile.org/jquery/1.10.2/jquery.min.js"></script>
<script type="text/javascript">
	$("#button").click(function(){
	  $.get("/api/testGet?time=123",function(data,status){
	    alert("数据: " + JSON.stringify(data) + "\n状态: " + status);
	  });
	});
	$("#button2").click(function(){
    $.ajax({
      method: 'POST',
      data: { produnctInfo: 123 },
      dataType: 'json',
      url: '/api/testPost',
      success: function(data) {
        alert("数据: " + JSON.stringify(data) + "\n状态: " );
      }
    })
	  // $.post("/api/testPost",{test:123},function(data,status){
	  //   alert("数据: " + JSON.stringify(data) + "\n状态: " + status);
	  // });
	});
</script>
</html>